package com.idmiss.qdpz.service.article;

import com.idmiss.qdpz.common.page.PageResult;
import com.idmiss.qdpz.controller.admin.article.vo.ArticlePageReqVO;
import com.idmiss.qdpz.dal.dataobject.article.ArticleDO;
import com.idmiss.qdpz.dal.mysql.article.ArticleMapper;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;

/**
 * 资讯 Service 实现类
 *
 * @author idmiss
 */
@Service
@Validated
public class ArticleServiceImpl implements ArticleService {

    @Resource
    private ArticleMapper articleMapper;


    @Override
    public ArticleDO getArticle(Integer id) {
        return articleMapper.selectById(id);
    }

    @Override
    public PageResult<ArticleDO> getArticlePage(ArticlePageReqVO pageReqVO) {
        return articleMapper.selectPage(pageReqVO);
    }

}
